<html>
<header>
</header>
<body>
{get sql="SELECT * FROM edufe_content c LEFT JOIN edufe_content_rel r ON c.id=r.contentid LEFT JOIN edufe_c_news n ON c.id=n.contentid WHERE c.catid='$catid' AND c.status=99 ORDER BY c.listorder DESC, c.addtime DESC" rows="1"}
<script>
    {if isset($r['link']) && !empty($r['link'])}
        self.location="/{$r['link']}";
    {else}
        self.location="/{$r['url']}";
    {/if}
</script>
{/get}
</body>
</html>